<?php
/**
 * @version		$Id: index.php 20196 2011-01-09 02:40:25Z ian $
 * @package		Joomla.Site
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/* The following line loads the MooTools JavaScript Library */
JHTML::_('behavior.framework', true);

/* The following line gets the application object for things like displaying the site name */
$app = JFactory::getApplication();
?>
<?php echo '<?'; ?>xml version="1.0" encoding="<?php echo $this->_charset ?>"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php
$pageoption = JRequest::getVar('option', '');
$pageview = JRequest::getVar('view', '');
$pageitemid = JRequest::getVar('Itemid', '');
$pageid = JRequest::getVar('id', '');
$pagetask = JRequest::getVar('task', '');
$page = JRequest::getVar('page', '');
$menu = & JSite::getMenu();
$document =& JFactory::getDocument();
$title = $document->getTitle();
$layout = JRequest::getVar('layout', '');

$this->setGenerator('');
$user =& JFactory::getUser();
if ($user->get('guest') == 1) {
	$headerstuff = $this->getHeadData();
	$headerstuff['scripts'] = array();
	$headerstuff['links'] = array();
	$this->setHeadData($headerstuff); 
}
$app = JFactory::getApplication();
$this->setTitle( $this->getTitle() . ' | ' . $app->getCfg( 'sitename' ) );
?>
<jdoc:include type="head" />
<link href="<?php echo $this->baseurl ?>/templates/xescort/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/xescort/js/jquery-1.4.4.min.js"></script>
<script src="<?php echo $this->baseurl ?>/templates/xescort/js/jquery.form.js" type="text/javascript"></script>
<script src="<?php echo $this->baseurl ?>/templates/xescort/js/jquery.validate.js" type="text/javascript"></script>
<script src="<?php echo $this->baseurl ?>/templates/xescort/js/jquery.updnWatermark.js" type="text/javascript"></script>
<script src="<?php echo $this->baseurl ?>/templates/xescort/js/menu.js" type="text/javascript"></script>
<script src="<?php echo $this->baseurl ?>/templates/xescort/js/image.slider.js" type="text/javascript"></script>
<script src="<?php echo $this->baseurl ?>/templates/xescort/js/jquery.fancybox-1.3.4.pack.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/xescort/js/list_images.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/xescortlogin/js/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/xescortlogin/js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/xescortlogin/js/jquery-dynamic-form.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo $this->baseurl ?>/templates/xescortlogin/js/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
</head>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/xescort/js/jScroll_1.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/xescort/js/jScroll_2.js"></script>
<script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/xescort/js/swfobject.js"></script>
<script language="javascript">
    $(document).ready(function(){
        // js cua roll
        $('#pane').jScrollPane({scrollbarWidth: 16});
    });
</script>
<script language="javascript">
    $(document).ready(function(){
        // js cua roll
        $('#pane1').jScrollPane({scrollbarWidth: 16});
    });
</script>
<script language="javascript">
    $(document).ready(function(){
        // js cua roll
        $('#pane2').jScrollPane({scrollbarWidth: 16});
    });
</script>
<script language="javascript">
    $(document).ready(function(){
        // js cua roll
        $('#pane3').jScrollPane({scrollbarWidth: 16});
    });
</script>
<script language="javascript">
    $(document).ready(function(){
        // js cua roll
        $('#pane4').jScrollPane({scrollbarWidth: 16});
    });
</script>
<script language="javascript">
    $(document).ready(function(){
        // js cua roll
        $('#pane5').jScrollPane({scrollbarWidth: 16});
    });
</script>
<script language="javascript">
	jQuery(document).ready(function(){
		jQuery("#mycarousel").jCarouselLite({
			btnNext: ".next",
			btnPrev: ".prev",
			visible : 5,
			scroll: 1,
			speed : 400
		});						
	});	
</script>
<script language="javascript">
	jQuery(document).ready(function(){
		jQuery("#mycarouse2").jCarouselLite({
			btnNext: ".next2",
			btnPrev: ".prev2",
			visible : 5,
			scroll: 1,
			speed : 400
		});	
		jQuery.updnWatermark.attachAll({ cssClass: "myWatermark" });
		$("#editprofile_fb").fancybox({
			'height'			: '100%',
			'autoScale'			: true,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none'

		});
		$("#editdescription_fb").fancybox({
			'height'			: '100%',
			'autoScale'			: true,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none'

		});
		$("#addservices_fb").fancybox({
			'height'			: '100%',
			'autoScale'			: true,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none'

		});
		$("#updateservices_fb").fancybox({
			'height'			: '100%',
			'autoScale'			: true,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none'

		});
		$("#allaudios_fb").fancybox({
			'height'			: '100%',
			'autoScale'			: true,
			'transitionIn'		: 'none',
			'transitionOut'		: 'none'

		});
		
		
	});	
</script>
<script language="javascript">
function playsound(fileurl){
	var flashvars = {file:fileurl, autostart:true };
	var params = {url:fileurl};
	var attributes = {};
	swfobject.switchOffAutoHideShow();
	swfobject.embedSWF("<?php echo $this->baseurl ?>/templates/xescort/mediaplayer.swf", "flashinstall", "1", "1", "9.0.0", null, flashvars, params, attributes);
}
function stopsound(){
	$('#getsound').html('<div id="flashinstall"></div>');
}

function click_sendlogin(){
	document.getElementById('sendlogin').click();
};
function close_popup(){
	var fel=$('#f_focus').html();
	$('#backoverlay').hide();
	$('#show_popup').hide();
	$('#' + fel ).focus();
};
</script>
<style>
.nav_top li#current{ margin:0; padding:0; list-style-type:none; background:#2f0035 url(<?php echo $this->baseurl ?>/templates/xescort/images/line_right_nav.png) no-repeat left; display:block;float:left;}
img{border: none;}
.bg_alert{ width:270px; height:115px; background:url(<?php echo $this->baseurl ?>/templates/xescort/images/bg_alert.png) no-repeat top left; margin:0px auto; padding:15px 0px 0px 83px; color:#000;}
.m35l{ margin-left:35px;}
.myWatermark{
	font-size: 11px;
	height: 24px;
	line-height: 24px;
	margin-left: 2px;
}
</style>
<body>
<!--Popup-->
<div class="bg_alert" id="show_popup" style="display:none; position: fixed; top: 35%; left: 50%; z-index:10001; margin-left:-140px;"> <span id="f_focus" style="display:none;"></span>
  <div style="margin:0; padding-top:10px; min-height:60px;" id="alert"></div>
  <div style="padding-left: 40px;"><a href="javascript:void(0);" onclick="close_popup();"><img src="<?php echo $this->baseurl ?>/templates/xescort/images/bt_luk1.png" alt="" /></a></div>
</div>
<!--End Popup-->
<!--Need-->
<div style="display: none;position: fixed; top: 0;left: 0;width: 100%;height: 100%;background-color: #000000;z-index:10000;-moz-opacity: 0.8;opacity:.80;filter: alpha(opacity=80);" id="backoverlay"></div>
<!--End-->
<div id="page_margins">
  <div id="page">
    <div id="header">
      <div class="w374 float_left"><a href="/"><img src="<?php echo $this->baseurl ?>/templates/xescort/images/logo.png"/></a></div>
      <?php
	  	$user 	=& JFactory::getUser();
		if ( $user->get('guest')) {
	  ?>
      <div class="w344 p22t float_right">
        <form action="" method="post" name="com-login" id="com-form-login">
          <p class="box_txt_login">
            <input type="text" value="" name="username" id="username" class="text" title="Brugernavn"/>
          </p>
          <p class="box_txt_login">
            <input type="password" value="" id="passwd" name="passwd" class="text" title="Adgangskode"/>
          </p>
          <a href="javascript:void(0);" class="submit" onclick="click_sendlogin();"><img src="<?php echo $this->baseurl ?>/templates/xescort/images/login.png" /></a>
          <p class="cb"></p>
          <div class="bg_husk">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="27%"><input type="checkbox" id="remember" name="remember"/>
                  <span style=" position:relative; top:-2px; padding-left:3px;">Husk mig</span></td>
                <td width="38%"><a href="index.php?option=com_user&view=remind&Itemid=0">Glemt  Adgangskode?</a></td>
                <td width="35%"><a href="index.php?option=com_user&view=register&Itemid=0">OPRET BRUGER!</a></td>
              </tr>
            </table>
          </div>
          <input type="submit" name="sendlogin" id="sendlogin" value="Send" style="display: none;" />
          <input type="hidden" name="option" value="com_user" />
          <input type="hidden" name="task" value="login" />
          <input type="hidden" name="return" value="<?php echo $this->return; ?>" />
          <?php echo JHTML::_( 'form.token' ); ?>
        </form>
      </div>
      <?php
	  	}else{
		?>
      <div class=" w296 p30t float_right">
        <p style="color:#FFF;" class=" p12r float_left p5t"> Hej, <?php echo $user->get('name') ?> </p>
        <p class="bg_name_pc float_right"> GÅ til User-cp </p>
        <p class="cb"></p>
      </div>
      <?php
		 }
		?>
      <p class="cb"></p>
    </div>
    <div class="nav_top">
     {module Main Menu Images}
    </div>
    <!-- begin component -->
        <jdoc:include type="component" />
        <!-- end component -->
  </div>
  <div id="footer">
    <div id="footer_content"> <span class="float_left">Copyright © 2010<span class="style2"> XEscort.DK.</span> All rights reserved.</span> <span class="float_right">Design by <a href="http://www.mywebcreations.dk" target="_blank">My Web Creations</a></span> </div>
  </div>
  <div class="box_livesuppor_right"><a href="#"><img src="<?php echo $this->baseurl ?>/templates/xescort/images/bt_livesupport.png" width="35" height="157" /></a></div>
</div>
<div id="getsound">
<div id="flashinstall"></div>
</div>
<script>
jQuery("#com-form-login").validate({		
	errorPlacement: function(error, element) {	
		
	},
	invalidHandler: function(form, validator) {
		
	  var errors = validator.numberOfInvalids();
	  if (errors) {			  					
		$('#alert').html(validator['errorList'][0]['message']);
		$('#backoverlay').show();
		$('#show_popup').show();
		$('#f_focus').html(validator['errorList'][0]['element'].name);
		validator['errorList'][0]['element'].focus();
		
	  } else {
		
	  }
	},
	rules: {
		username: "required",
		passwd: "required"
	},
	messages: {
		username: "Username skal udfyldes!",
		passwd : "Password skal udfyldes"
	}
});
</script>
</body>
</html>

